package com.xunwulian.base.util;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import java.lang.reflect.Type;

/**
 * Created by liyankai on 2018/2/2.
 */
public class GsonUtil {

    public static Gson gson = new GsonBuilder().setPrettyPrinting().create();

    public static String toJson(Object src, Type typeOfSrc) {
        return gson.toJson(src, typeOfSrc);
    }
    
}
